package a.g;

import a.f.h.g;
import a.f.h.j;
import a.f.rc;
import a.h.cc;
import a.h.dc;
import a.h.nc;
import a.h.z;

import java.awt.*;

public class l
  extends h
{
  private static final String q = "COMPACT_ORTHOGONAL";
  private static final String r = "ORTHOGONAL_LAYOUT_STYLE";
  private static final String s = "GRID";
  private static final String t = "NORMAL";
  private static final String u = "NORMAL_TREE";
  private static final String v = "FIXED_MIXED";
  private static final String w = "FIXED_BOX_NODES";
  private static final String x = "ASPECT_RATIO";
  private static final String y = "USE_VIEW_ASPECT_RATIO";
  private static final String z = "PLACEMENT_STRATEGY";
  private static final String A = "STYLE_ROWS";
  private static final String B = "STYLE_PACKED_COMPACT_RECTANGLE";
  private static final String C = "PATH_FINDER";
  private static final String D = "ORTHOGONAL_PATTERN_PATH_FINDER";
  private static final String E = "ORTHOGONAL_SHORTESTPATH_PATH_FINDER";
  private static final String F = "INTER_EDGE_ROUTER";
  private static final String G = "ROUTE_ALL_EDGES";
  private static final String H = "MINIMUM_DISTANCE";
  private static final String I = "SPACE_DRIVEN_VS_CENTER_DRIVEN_SEARCH";
  private static final String J = "EDGE_CROSSING_COST";
  private static final String K = "NODE_CROSSING_COST";
  private static final String L = "BEND_COST";
  private static final String[] M = { "STYLE_ROWS", "STYLE_PACKED_COMPACT_RECTANGLE" };
  private static final String[] N = { "NORMAL", "NORMAL_TREE", "FIXED_MIXED", "FIXED_BOX_NODES" };
  private static final String[] O = { "ORTHOGONAL_PATTERN_PATH_FINDER", "ORTHOGONAL_SHORTESTPATH_PATH_FINDER" };
  public static int P;
  
  public l()
  {
    super("COMPACT_ORTHOGONAL", "yFiles Layout Team", "Compact Orthogonal Layouter");
    d(true);
  }
  
  public dc j()
  {
    int k = f.p;
    boolean bool = f.o;
    dc localdc = new dc(a());
    z localz = new z(localdc);
    g localg = new g();
    a(localg);
    j localj = (j)localg.a();
    int i = 0;
    if (k == 0)
    {
      switch (localj.B())
      {
      case 0: 
        i = 0;
        if (k != 0) {
          break label166;
        }
        if (!bool) {
          break;
        }
      case 4: 
        i = 1;
        if (k != 0) {
          break label166;
        }
        if (!bool) {
          break;
        }
      case 5: 
        i = 2;
        if (k != 0) {
          break label166;
        }
        if (!bool) {
          break;
        }
      case 6: 
        i = 3;
      }
      localdc.a("ORTHOGONAL_LAYOUT_STYLE", N, i);
    }
    label166:
    eb.b_ localb_ = (eb.b_)localg.c();
    int j = 0;
    if (k == 0)
    {
      switch (localb_.a().h())
      {
      case 1: 
        j = 0;
        if (k != 0) {
          break label304;
        }
        if (!bool) {
          break;
        }
      case 5: 
        j = 1;
      }
      localdc.a("PLACEMENT_STRATEGY", M, j);
      localdc.a("USE_VIEW_ASPECT_RATIO", true);
      localdc.a("ASPECT_RATIO", localg.f());
      localz.a("USE_VIEW_ASPECT_RATIO", Boolean.FALSE, "ASPECT_RATIO");
      localdc.a("GRID", localg.e()).a(nc.y, new Integer(1));
    }
    label304:
    cc localcc = new cc();
    localcc.a("OptionGroup.title", "INTER_EDGE_ROUTER");
    localcc.a(localdc.a("PATH_FINDER", O, 1));
    eb.a_ locala_ = (eb.a_)localg.d();
    if (k == 0) {}
    localcc.a(localdc.a("ROUTE_ALL_EDGES", !locala_.a()));
    a.f.l.h localh = new a.f.l.h();
    c.a_ locala_1 = new c.a_();
    localcc.a(localdc.a("BEND_COST", localh.l()));
    localcc.a(localdc.a("NODE_CROSSING_COST", localh.k()));
    localcc.a(localdc.a("MINIMUM_DISTANCE", locala_1.K()));
    localdc.k("MINIMUM_DISTANCE").a(nc.y, new Integer(4));
    localcc.a(localdc.a("EDGE_CROSSING_COST", locala_1.u()));
    localcc.a(localdc.a("SPACE_DRIVEN_VS_CENTER_DRIVEN_SEARCH", locala_1.P(), 0.0D, 1.0D));
    localz.a("PATH_FINDER", "ORTHOGONAL_PATTERN_PATH_FINDER", "BEND_COST");
    localz.a("PATH_FINDER", "ORTHOGONAL_PATTERN_PATH_FINDER", "NODE_CROSSING_COST");
    localz.a("PATH_FINDER", "ORTHOGONAL_SHORTESTPATH_PATH_FINDER", "SPACE_DRIVEN_VS_CENTER_DRIVEN_SEARCH");
    return localdc;
  }
  
  private void a(g paramg)
  {
    Object localObject1 = paramg.d();
    if (!(localObject1 instanceof eb.a_))
    {
      localObject1 = new eb.a_();
      paramg.a((eb.d_)localObject1);
    }
    Object localObject2 = paramg.c();
    if (!(localObject2 instanceof eb.b_))
    {
      localObject2 = new eb.b_();
      paramg.a((eb.g_)localObject2);
    }
    Object localObject3 = paramg.a();
    if (!(localObject3 instanceof j))
    {
      localObject3 = new j();
      paramg.a((rc)localObject3);
    }
  }
  
  private void a(dc paramdc, eb.a_ parama_)
  {
    if (f.p == 0) {}
    parama_.a(!paramdc.g("ROUTE_ALL_EDGES"));
    Object localObject;
    if (paramdc.i("PATH_FINDER") == 0)
    {
      localObject = new a.f.l.h();
      ((a.f.l.h)localObject).a(paramdc.e("MINIMUM_DISTANCE"));
      ((a.f.l.h)localObject).c(paramdc.f("EDGE_CROSSING_COST"));
      ((a.f.l.h)localObject).d(paramdc.f("NODE_CROSSING_COST"));
      ((a.f.l.h)localObject).e(paramdc.f("BEND_COST"));
      parama_.c().b((rc)localObject);
      if (!f.o) {}
    }
    else
    {
      localObject = new c.a_();
      ((c.a_)localObject).c(paramdc.e("MINIMUM_DISTANCE"));
      ((c.a_)localObject).b(paramdc.f("EDGE_CROSSING_COST"));
      ((c.a_)localObject).c(paramdc.f("SPACE_DRIVEN_VS_CENTER_DRIVEN_SEARCH"));
      parama_.c().b((rc)localObject);
    }
  }
  
  private void a(dc paramdc, eb.b_ paramb_)
  {
    int i = f.p;
    if (i == 0) {
      if ("STYLE_PACKED_COMPACT_RECTANGLE".equals(paramdc.j("PLACEMENT_STRATEGY"))) {
        paramb_.a().a((byte)5);
      }
    }
    if ((i != 0) || ((f.o) && ("STYLE_ROWS".equals(paramdc.j("PLACEMENT_STRATEGY"))))) {
      paramb_.a().a((byte)1);
    }
  }
  
  private void a(dc paramdc, j paramj)
  {
    int i = f.p;
    boolean bool = f.o;
    if (i == 0) {}
    switch (dc.a(N, paramdc.h("ORTHOGONAL_LAYOUT_STYLE")))
    {
    case 0: 
    default: 
      paramj.c(0);
      if (i == 0) {
        if (!bool) {
          return;
        }
      }
    case 1: 
      paramj.c(4);
      if (i == 0) {
        if (!bool) {
          return;
        }
      }
    case 2: 
      if (i == 0)
      {
        paramj.c(5);
        if (!bool) {
          return;
        }
      }
      break;
    }
    paramj.c(6);
  }
  
  private void a(dc paramdc, g paramg)
  {
    int i = f.p;
    paramg.a(paramdc.e("GRID"));
    if (i == 0) {
      if ((paramdc.g("USE_VIEW_ASPECT_RATIO")) && ((i != 0) || (g() != null)))
      {
        Dimension localDimension = g().getSize();
        d = localDimension.getWidth() / localDimension.getHeight();
        if (i != 0) {
          return;
        }
        if (!f.o) {
          break label80;
        }
      }
    }
    double d = paramdc.f("ASPECT_RATIO");
    label80:
    paramg.a(d);
  }
  
  public void n()
  {
    dc localdc = i();
    g localg = new g();
    a(localg);
    eb.a_ locala_ = (eb.a_)localg.d();
    a(localdc, locala_);
    eb.b_ localb_ = (eb.b_)localg.c();
    a(localdc, localb_);
    j localj = (j)localg.a();
    a(localdc, localj);
    a(localdc, localg);
    a.f.c.c localc = new a.f.c.c(localg);
    localc.a(false);
    a(localc);
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.g.l

 * JD-Core Version:    0.7.0.1

 */